/**
 * Created by forcht on 2018/7/13.
 */
public class Solution {
    public int singleNumber(int[] A) {
        int a=A[0];
        for(int i=1;i<A.length;i++){
            a=a^A[i];
        }
        return a;
    }

    public static void main(String[] args) {
        Solution solution=new Solution();
        System.out.println(solution.singleNumber(new int[]{1,2,3,3,2,1,6}));
    }
}
